package annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

public class Anno_Demo1 {

}

@Target({ElementType.TYPE,ElementType.FIELD,ElementType.PARAMETER})
@Retention(RetentionPolicy.SOURCE)
@interface Mapper{
    String name() default "wdnmd";
    //注解特殊属性value，特殊值可以直接进行赋值
    String value();
}

@Mapper(name = "dd", value = "dddd")
class Hello{
    @Mapper("fg")
    String name;

    public void show (@Mapper("wd") String name){

    }
}